package com.baofu.paycore.dal.mapper;

import com.baofu.paycore.dal.mapper.base.GenericMapper;
import com.baofu.paycore.dal.model.ClearAccountDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *  充值/提现账户资金单Mapper
 *  <p>
 *    1.依支付单号查询充值/提现账户资金单信息
 *  </p>
 * User: xin deng  Date: 16/4/20 ProjectName: paycore Version: 1.0
 */
public interface ClearAccountMapper extends GenericMapper<ClearAccountDO> {

    /**
     * 依支付单号查询充值/提现账户资金单信息
     *
     * @param payNo         支付单号
     * @return              资金单
     */
    List<ClearAccountDO> queryClearAccountByPayNo(@Param("payNo") String payNo);

    /**
     * 更新反向标识
     *
     * @param clearAccountDO  资金单
     * @return                更新条数
     */
    int updateReverseFlag(ClearAccountDO clearAccountDO);

    /**
     * 补单标识原单废弃
     * @param clearAccountDO
     * @return
     */
    int updateDiscard(ClearAccountDO clearAccountDO);
}
